<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #weixin{
      width: 100px;
      height: 100px;
      border: 1px solid green;
      margin: 50px auto;
      text-align: center;
      line-height: 100px;
      font-size: 18px;
      font-weight: bold;
      position: relative;
    }

    #dot{
      position: absolute;
      top:-10px;
      right:-10px;
      height: 20px;
      width: 20px;
      border-radius: 50%;
      background-color: red;
      text-align: center;
      line-height: 20px;
      font-size: 14px;
    }
  </style>
</head>
<body>
  <div id="weixin">
    微信
    <div id="dot">
      2
    </div>
  </div>
</body>
</html>